package com.ling.pl.security.service;

import com.ling.pl.core.commons.support.DaoPage;
import com.ling.pl.security.model.DefaultGroup;
import com.ling.pl.security.model.GroupMember;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @author bo.wang
 */
@Component(DefaultGroupService.BEAN_ID)
public class DefaultGroupService extends BaseDefaultGroupService {
    public List<DefaultGroup> loadUserGroups(String username) {
        return defaultGroupDao.loadUserGroups(username);
    }

    public DaoPage loadGroups(Map params, Integer pageIndex, Integer pageSize) {
        return defaultGroupDao.loadGroups(params, pageIndex, pageSize);
    }

    public List<GroupMember> loadGroupMembers(Map params) {
        return defaultGroupDao.loadGroupMembers(params);
    }

    public DaoPage loadGroupMembers(Map params, Integer pageIndex, Integer pageSize) {
        return defaultGroupDao.loadGroupMembers(params, pageIndex, pageSize);
    }
}

